﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using Microsoft.ApplicationBlocks.Data;

namespace DB
{
    public class DB
    {
        public  string Conn()
	    {
          return  ConfigurationManager.ConnectionStrings["EFDbContext"].ConnectionString;
             
	    }

        public DataSet ReturnData(string StoredProcName, string[] param)
        {
            DataSet DS = SqlHelper.ExecuteDataset(ConfigurationManager.ConnectionStrings["EFDbContext"].ConnectionString, StoredProcName, param);
            return DS;
        }

        public object ManageData(string StoredProcName, string[] param)
        {
            object obj = SqlHelper.ExecuteScalar(ConfigurationManager.ConnectionStrings["EFDbContext"].ConnectionString, StoredProcName, param);
            return obj;
        }
    }
}